// $ANTLR 3.4 C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g 2012-10-17 02:59:34

	package analextoken;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class Analextoken extends Lexer {
    public static final int EOF=-1;
    public static final int BLANCO=4;
    public static final int COMENTARIO=5;
    public static final int COMENTARIO_LINEA=6;
    public static final int DIGITO=7;
    public static final int NUEVA_LINEA=8;
    public static final int NUMERO=9;
    public static final int OPERADOR=10;
    public static final int PARENTESIS=11;
    public static final int SEPARADOR=12;

         public Token emit() {
            MiToken token = new MiToken(input, state.type, state.channel,state.tokenStartCharIndex, getCharIndex()-1);
            token.setLine(state.tokenStartLine);
            token.setText(state.text);
            token.setCharPositionInLine(state.tokenStartCharPositionInLine);
            token.setNuevoAtributo(this.getSourceName()); //Nombre del fichero
            emit(token);
            return token;
        }


    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public Analextoken() {} 
    public Analextoken(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public Analextoken(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g"; }

    // $ANTLR start "NUEVA_LINEA"
    public final void mNUEVA_LINEA() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:13: ( ( ( '\\r' )? '\\n' ) )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:15: ( ( '\\r' )? '\\n' )
            {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:15: ( ( '\\r' )? '\\n' )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:16: ( '\\r' )? '\\n'
            {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:16: ( '\\r' )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0=='\r') ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:34:16: '\\r'
                    {
                    match('\r'); 

                    }
                    break;

            }


            match('\n'); 

            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUEVA_LINEA"

    // $ANTLR start "DIGITO"
    public final void mDIGITO() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:37:8: ( ( '0' .. '9' ) )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIGITO"

    // $ANTLR start "COMENTARIO"
    public final void mCOMENTARIO() throws RecognitionException {
        try {
            int _type = COMENTARIO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:39:12: ( '/*' ( options {greedy=false; } : . )* '*/' )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:39:14: '/*' ( options {greedy=false; } : . )* '*/'
            {
            match("/*"); 



            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:39:19: ( options {greedy=false; } : . )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0=='*') ) {
                    int LA2_1 = input.LA(2);

                    if ( (LA2_1=='/') ) {
                        alt2=2;
                    }
                    else if ( ((LA2_1 >= '\u0000' && LA2_1 <= '.')||(LA2_1 >= '0' && LA2_1 <= '\uFFFF')) ) {
                        alt2=1;
                    }


                }
                else if ( ((LA2_0 >= '\u0000' && LA2_0 <= ')')||(LA2_0 >= '+' && LA2_0 <= '\uFFFF')) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:39:44: .
            	    {
            	    matchAny(); 

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            match("*/"); 



            _channel=HIDDEN;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "COMENTARIO"

    // $ANTLR start "COMENTARIO_LINEA"
    public final void mCOMENTARIO_LINEA() throws RecognitionException {
        try {
            int _type = COMENTARIO_LINEA;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:41:17: ( '//' ( options {greedy=false; } : . )* NUEVA_LINEA )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:41:19: '//' ( options {greedy=false; } : . )* NUEVA_LINEA
            {
            match("//"); 



            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:41:24: ( options {greedy=false; } : . )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0=='\r') ) {
                    alt3=2;
                }
                else if ( (LA3_0=='\n') ) {
                    alt3=2;
                }
                else if ( ((LA3_0 >= '\u0000' && LA3_0 <= '\t')||(LA3_0 >= '\u000B' && LA3_0 <= '\f')||(LA3_0 >= '\u000E' && LA3_0 <= '\uFFFF')) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:41:49: .
            	    {
            	    matchAny(); 

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            mNUEVA_LINEA(); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "COMENTARIO_LINEA"

    // $ANTLR start "BLANCO"
    public final void mBLANCO() throws RecognitionException {
        try {
            int _type = BLANCO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:8: ( ( ' ' | '\\t' | NUEVA_LINEA ) )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:10: ( ' ' | '\\t' | NUEVA_LINEA )
            {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:10: ( ' ' | '\\t' | NUEVA_LINEA )
            int alt4=3;
            switch ( input.LA(1) ) {
            case ' ':
                {
                alt4=1;
                }
                break;
            case '\t':
                {
                alt4=2;
                }
                break;
            case '\n':
            case '\r':
                {
                alt4=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;

            }

            switch (alt4) {
                case 1 :
                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:11: ' '
                    {
                    match(' '); 

                    }
                    break;
                case 2 :
                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:15: '\\t'
                    {
                    match('\t'); 

                    }
                    break;
                case 3 :
                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:43:20: NUEVA_LINEA
                    {
                    mNUEVA_LINEA(); 


                    }
                    break;

            }


            _channel=HIDDEN;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "BLANCO"

    // $ANTLR start "NUMERO"
    public final void mNUMERO() throws RecognitionException {
        try {
            int _type = NUMERO;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:7: ( ( DIGITO )+ ( '.' ( DIGITO )+ )? )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:9: ( DIGITO )+ ( '.' ( DIGITO )+ )?
            {
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:9: ( DIGITO )+
            int cnt5=0;
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( ((LA5_0 >= '0' && LA5_0 <= '9')) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:
            	    {
            	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
            	        input.consume();
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt5 >= 1 ) break loop5;
                        EarlyExitException eee =
                            new EarlyExitException(5, input);
                        throw eee;
                }
                cnt5++;
            } while (true);


            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:19: ( '.' ( DIGITO )+ )?
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0=='.') ) {
                alt7=1;
            }
            switch (alt7) {
                case 1 :
                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:20: '.' ( DIGITO )+
                    {
                    match('.'); 

                    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:45:23: ( DIGITO )+
                    int cnt6=0;
                    loop6:
                    do {
                        int alt6=2;
                        int LA6_0 = input.LA(1);

                        if ( ((LA6_0 >= '0' && LA6_0 <= '9')) ) {
                            alt6=1;
                        }


                        switch (alt6) {
                    	case 1 :
                    	    // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:
                    	    {
                    	    if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                    	        input.consume();
                    	    }
                    	    else {
                    	        MismatchedSetException mse = new MismatchedSetException(null,input);
                    	        recover(mse);
                    	        throw mse;
                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt6 >= 1 ) break loop6;
                                EarlyExitException eee =
                                    new EarlyExitException(6, input);
                                throw eee;
                        }
                        cnt6++;
                    } while (true);


                    }
                    break;

            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "NUMERO"

    // $ANTLR start "OPERADOR"
    public final void mOPERADOR() throws RecognitionException {
        try {
            int _type = OPERADOR;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:47:9: ( '+' | '-' | '/' | '*' )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:
            {
            if ( (input.LA(1) >= '*' && input.LA(1) <= '+')||input.LA(1)=='-'||input.LA(1)=='/' ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "OPERADOR"

    // $ANTLR start "PARENTESIS"
    public final void mPARENTESIS() throws RecognitionException {
        try {
            int _type = PARENTESIS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:49:11: ( '(' | ')' )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:
            {
            if ( (input.LA(1) >= '(' && input.LA(1) <= ')') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PARENTESIS"

    // $ANTLR start "SEPARADOR"
    public final void mSEPARADOR() throws RecognitionException {
        try {
            int _type = SEPARADOR;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:51:10: ( ';' )
            // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:51:12: ';'
            {
            match(';'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "SEPARADOR"

    public void mTokens() throws RecognitionException {
        // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:8: ( COMENTARIO | COMENTARIO_LINEA | BLANCO | NUMERO | OPERADOR | PARENTESIS | SEPARADOR )
        int alt8=7;
        switch ( input.LA(1) ) {
        case '/':
            {
            switch ( input.LA(2) ) {
            case '*':
                {
                alt8=1;
                }
                break;
            case '/':
                {
                alt8=2;
                }
                break;
            default:
                alt8=5;
            }

            }
            break;
        case '\t':
        case '\n':
        case '\r':
        case ' ':
            {
            alt8=3;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt8=4;
            }
            break;
        case '*':
        case '+':
        case '-':
            {
            alt8=5;
            }
            break;
        case '(':
        case ')':
            {
            alt8=6;
            }
            break;
        case ';':
            {
            alt8=7;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 8, 0, input);

            throw nvae;

        }

        switch (alt8) {
            case 1 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:10: COMENTARIO
                {
                mCOMENTARIO(); 


                }
                break;
            case 2 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:21: COMENTARIO_LINEA
                {
                mCOMENTARIO_LINEA(); 


                }
                break;
            case 3 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:38: BLANCO
                {
                mBLANCO(); 


                }
                break;
            case 4 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:45: NUMERO
                {
                mNUMERO(); 


                }
                break;
            case 5 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:52: OPERADOR
                {
                mOPERADOR(); 


                }
                break;
            case 6 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:61: PARENTESIS
                {
                mPARENTESIS(); 


                }
                break;
            case 7 :
                // C:\\Users\\Jose\\workspaceN\\Analex1\\src\\main\\java\\analextoken\\Analextoken.g:1:72: SEPARADOR
                {
                mSEPARADOR(); 


                }
                break;

        }

    }


 

}